package com.tinyengine.it.common.utils;

import java.util.Arrays;

/**
* @Description: 数据类型
* @Author: Ping.Liu
* @Date: 2025-03-27 - 9:06
*/
public enum ControllerParamsJavaDataType {
    String("String"),
    Object("Object"),
    List_Object("List<Object>"),
    Other("Other"),
    Page_Object("Page<Object>");

    private final String value;

    ControllerParamsJavaDataType(String value) {
        this.value = value;
    }

    public String getValue() {
        return value;
    }
    //通过 value 查找枚举
    public static ControllerParamsJavaDataType fromValue(String value) {
        return Arrays.stream(ControllerParamsJavaDataType.values())
                .filter(type -> type.value.equalsIgnoreCase(value)).findFirst().orElse(Other);
    }
}
